package com.yr.ryjk.interceptor;
/**
 * 例外,不需要过滤或拦截的请求
 * @author Rick
 *
 */
public class Except {
	static String[] resources={".jpg",".jpeg",".png",".gif",".ico",".css",".js",".woff",".eot",".svg",".ttf"};
	static String[] excepts={"login.jsp","welcome.html","error.jsp","/ryjk","/ryjk/"}; //jetty中SpringMVC匹配不到跟路径/ryjk
	
	/**
	 * 判断url是否是例外
	 * @param url
	 * @return
	 */
	static boolean isExcept(String url){
		boolean flag=false;
		for(String r:resources){
			if(url!=null&&url.endsWith(r)){
				flag=true;
				break;
			}
		}
		for(String e:excepts){
			if(url!=null&&url.endsWith(e)){
				flag=true;
				break;
			}
		}
		return flag;
	}
}
